import request from '@/utils/request'

// 查询流程定义列表
export function listFlowDefination(query) {
  return request({
    url: '/labdata/flowDefination/list',
    method: 'get',
    params: query
  })
}
///all
export function getAllFlowDict(query) {
  return request({
    url: '/labdata/flowDefination/all',
    method: 'get',
    params: query
  })
}
///preview/{workflowId}
export function previewDefination(workflowId) {
  return request({
    url: '/labdata/flowDefination/preview/' + workflowId,
    method: 'get'
  })
}
// 查询流程定义详细
export function getFlowDefination(workflowId) {
  return request({
    url: '/labdata/flowDefination/' + workflowId,
    method: 'get'
  })
}

// 新增流程定义
export function addFlowDefination(data) {
  return request({
    url: '/labdata/flowDefination',
    method: 'post',
    data: data
  })
}

// 修改流程定义
export function updateFlowDefination(data) {
  return request({
    url: '/labdata/flowDefination',
    method: 'put',
    data: data
  })
}

// 删除流程定义
export function delFlowDefination(workflowId) {
  return request({
    url: '/labdata/flowDefination/' + workflowId,
    method: 'delete'
  })
}

// 导出流程定义
export function exportFlowDefination(query) {
  return request({
    url: '/labdata/flowDefination/export',
    method: 'get',
    params: query
  })
}
